<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js">
<jsp:include page="../common/common-head.jsp"/>
<body>
<!-- Main wrapper -->
<div class="wrapper" id="wrapper">
  <!-- Header -->
  <jsp:include page="../common/common-top.jsp"/>

  <!-- //Header -->

  <!-- Start Bradcaump area -->
  <div class="ht__bradcaump__area bg-image--6">
    <div class="container">
      <div class="row">
        <div class="col-lg-12">
          <div class="bradcaump__inner text-center">
            <h2 class="bradcaump-title">图书列表</h2>
            <nav class="bradcaump-content">
              <a class="breadcrumb_item" href="/">Home</a>
              <span class="brd-separetor">/</span>
              <span class="breadcrumb_item active">图书列表</span>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- End Bradcaump area -->


  <!-- Start Shop Page -->
  <div class="page-shop-sidebar left--sidebar bg--white section-padding--lg">
    <div class="container">
      <div class="row">
        <div class="col-lg-3 col-12 order-2 order-lg-1 md-mt-40 sm-mt-40">
          <div class="shop__sidebar">
            <aside class="wedget__categories poroduct--cat">
              <h3 class="wedget__title">图书分类</h3>
              <ul>
                <c:forEach items="${CATEGORY_LIST}" var="item">
                  <li><a href="/goods/list?category=${item}">${item} </a></li>
                </c:forEach>
              </ul>
            </aside>

          </div>
        </div>
        <div class="col-lg-9 col-12 order-1 order-lg-2">
          <div class="row">
            <div class="col-lg-12">
              <div class="shop__list__wrapper d-flex flex-wrap flex-md-nowrap justify-content-between">
                <p>Showing ${pageInfo.startRow}–${pageInfo.endRow} of ${oageInfo.total} results</p>
                <div class="orderby__wrapper">
                  <form action="">
                    <input type="hidden" name="category" value="${goods.category}">
                    <input class="shot__byselect" name="name">
                    <button class="btn btn-primary btn-sm">搜索</button>
                  </form>

                </div>
              </div>
            </div>
          </div>
          <div class="tab__container">
            <div class="shop-grid tab-pane fade show active" id="nav-grid" role="tabpanel">
              <div class="row">
                <c:forEach items="${pageInfo.list}" var="item">
                  <!-- Start Single Product -->
                  <div class="col-lg-4 col-md-4 col-sm-6 col-12">
                    <div class="product">
                      <div class="product__thumb">
                        <a class="first__img" href="/goods/detail/${item.id}"><img src="${item.path}" alt="product image"></a>
                        <div class="new__box">
                          <span class="new-label">${item.tag}</span>
                        </div>
                        <ul class="prize position__right__bottom d-flex">
                          <li>$${item.money}元</li>
                        </ul>

                      </div>
                      <div class="product__content">
                        <h4><a href="/goods/detail/${item.id}">${item.name}</a></h4>
                      </div>
                    </div>
                  </div>
                  <!-- End Single Product -->
                </c:forEach>
              </div>
              <ul class="wn__pagination">
                <c:forEach items="${pageInfo.navigatepageNums}" var="num">
                  <li<c:if test="${pageInfo.pageNum == num}"> class="active"</c:if>>
                    <a <c:if test="${pageInfo.pageNum != num}"> href="${requestUrl}&pageNum=${num}" </c:if>>${num}</a>
                  </li>
                </c:forEach>
              </ul>
            </div>

          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- End Shop Page -->
  <!-- Footer Area -->
  <jsp:include page="../common/common-footer.jsp"/>
  <!-- //Footer Area -->
</div>
<!-- //Main wrapper -->


<jsp:include page="../common/common-script.jsp"/>
</body>
</html>
